<template>
	<view class="activity-container">
		<text class="title">活动页面</text>
		<custom-tabbar></custom-tabbar>
	</view>
</template>

<script>
export default {
	data() {
		return {
			title: '活动',
			hasUnsavedChanges: true
		}
	},
	methods: {
		async beforeTabSwitch({ from, to }) {
			if (this.hasUnsavedChanges) {
				return new Promise((resolve) => {
					uni.showModal({
						title: '提示',
						content: '当前有未保存的更改，确定要离开吗？',
						success: (res) => {
							resolve(res.confirm)
						}
					})
				})
			}
			return true
		}
	}
}
</script>

<style lang="scss" scoped>
.activity-container {
	padding: 20rpx;
	min-height: 100vh;
}

.title {
	font-size: 32rpx;
	color: #333;
	text-align: center;
	margin: 30rpx 0;
}
</style> 